package cn.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 
 * @since 2023-06-07
 */
@TableName("goods")
public class Goods extends Model<Goods> {

    private static final long serialVersionUID=1L;

    /**
     * 商品编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 分类
     */
    @TableField("kid")
    private Integer kid;

    @TableField(exist = false)
    private Kind kind;

    public Kind getKind() {
        return kind;
    }

    public void setKind(Kind kind) {
        this.kind = kind;
    }


    /**
     * 名称
     */
    @TableField("name")
    private String name;

    /**
     * 价格
     */
    @TableField("price")
    private Double price;

    /**
     * 图片
     */
    @TableField("pic")
    private String pic;

    /**
     * 介绍
     */
    @TableField("content")
    private String content;

    /**
     * 销量
     */
    @TableField("xiao")
    private Integer xiao;

    /**
     * 点赞
     */
    @TableField("zan")
    private Integer zan;

    /**
     * 库存
     */
    @TableField("kucun")
    private Integer kucun;

    /**
     * 评分
     */
    @TableField("score")
    private Double score;

    /**
     * 备用1
     */
    @TableField("bak1")
    private String bak1;

    /**
     * 备用2
     */
    @TableField("bak2")
    private String bak2;

    /**
     * 备用3
     */
    @TableField("bak3")
    private String bak3;

    /**
     * 删除标记
     */
    @TableField("isdel")
    private Integer isdel;


    public Integer getId() {
        return id;
    }

    public Goods setId(Integer id) {
        this.id = id;
        return this;
    }

    public Integer getKid() {
        return kid;
    }

    public Goods setKid(Integer kid) {
        this.kid = kid;
        return this;
    }

    public String getName() {
        return name;
    }

    public Goods setName(String name) {
        this.name = name;
        return this;
    }

    public Double getPrice() {
        return price;
    }

    public Goods setPrice(Double price) {
        this.price = price;
        return this;
    }

    public String getPic() {
        return pic;
    }

    public Goods setPic(String pic) {
        this.pic = pic;
        return this;
    }

    public String getContent() {
        return content;
    }

    public Goods setContent(String content) {
        this.content = content;
        return this;
    }

    public Integer getXiao() {
        return xiao;
    }

    public Goods setXiao(Integer xiao) {
        this.xiao = xiao;
        return this;
    }

    public Integer getZan() {
        return zan;
    }

    public Goods setZan(Integer zan) {
        this.zan = zan;
        return this;
    }

    public Integer getKucun() {
        return kucun;
    }

    public Goods setKucun(Integer kucun) {
        this.kucun = kucun;
        return this;
    }

    public Double getScore() {
        return score;
    }

    public Goods setScore(Double score) {
        this.score = score;
        return this;
    }

    public String getBak1() {
        return bak1;
    }

    public Goods setBak1(String bak1) {
        this.bak1 = bak1;
        return this;
    }

    public String getBak2() {
        return bak2;
    }

    public Goods setBak2(String bak2) {
        this.bak2 = bak2;
        return this;
    }

    public String getBak3() {
        return bak3;
    }

    public Goods setBak3(String bak3) {
        this.bak3 = bak3;
        return this;
    }

    public Integer getIsdel() {
        return isdel;
    }

    public Goods setIsdel(Integer isdel) {
        this.isdel = isdel;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Goods{" +
        "id=" + id +
        ", kid=" + kid +
        ", name=" + name +
        ", price=" + price +
        ", pic=" + pic +
        ", content=" + content +
        ", xiao=" + xiao +
        ", zan=" + zan +
        ", kucun=" + kucun +
        ", score=" + score +
        ", bak1=" + bak1 +
        ", bak2=" + bak2 +
        ", bak3=" + bak3 +
        ", isdel=" + isdel +
        "}";
    }
}
